define(function(){
    return function (localData,id,cb){
        let i=0
        localData.some((val,idx)=>{
            i=idx
            return val.id===id
        })
        cb(i)
        localStorage.setItem("goodsMsg",JSON.stringify(localData))
    }
});